import FluentUI
import QtQuick
import QtQuick.Layouts

// 注册主页面
FluWindow {
    id: mainWindow
    width: 1200
    height: 675
    minimumWidth: 640
    minimumHeight: 360
    backgroundColor: "#FFFFFF"
    fitsAppBarWindows: true

    // 基于窗口宽度定义一个比例因子
    property real fontSizeFactor: mainWindow.width / 1200

    GridLayout {
        anchors.fill: parent
        columns: 2

        Rectangle {
            color: "#3F8CFF"
            Layout.fillWidth: true
            Layout.fillHeight: true

            Column {
                x: parent.width * 0.10
                y: parent.height * 0.15
                spacing: parent.height * 0.04

                Column {
                    spacing: parent.height * 0.04
                    Text {
                        text: "Hi！你好"
                        font.pointSize: 28 * fontSizeFactor
                        font.family: "MiSans"
                        color: "#FFFFFF"
                    }
                    Text {
                        text: "欢迎进入模拟面试系统"
                        font.pointSize: 28 * fontSizeFactor
                        font.family: "MiSans"
                        color: "#FFFFFF"
                    }
                }

                FluImage {
                    width: parent.parent.width * 0.8
                    fillMode: Image.PreserveAspectFit
                    source: "qrc:/image/image/LoginInterface.png"
                }
            }
        }

        // 登录功能区
        Loader {
            Layout.fillWidth: true
            Layout.fillHeight: true
            source: "LoginFunc.qml"
        }
    }
}
